<!DOCTYPE HTML>
<html>

<head>
      <title>审批帖子列表</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <link href="../../../assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/bui-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/page-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/jx-style.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/prettify.css" rel="stylesheet" type="text/css" />
</head>

<body class="dark-theme">
      <div class="container">
            <div class="detail-page">
                  <div class="detail-page-title">
                        <h4>审批帖子列表
                              <button id="add-new-btn" class="jx-btn btn-default pull-right">新增帖子</button>
                        </h4>
                  </div>
                  <div class="jx-search-container">
                  <form id="J_Form" class="jx-form form-horizontal jx-form-thin" method="post">
                     <div class="row ">
                        <div class="control-group span11">
                              <label class="control-label">创建时间 ：</label>
                              <div class="controls">
                                    <input class="calendar calendar-time" type="text"  name="startTime" id="startTime"><span> &nbsp;-&nbsp; </span>
                                    <input class="calendar calendar-time" type="text"  name="endTime" id="endTime">
                              </div>
                        </div>
                        <div class="control-group span7">
                              <label class="control-label">商户：</label>
                              <div class="controls">
                                    <input type="text" class=" control-text" name="name" id="goodsName">
                              </div>
                        </div>
                        <div class="control-group span7">
                              <label class="control-label">帖子标题：</label>
                              <div class="controls">
                                    <input type="text" class=" control-text" name="name" id="goodsName">
                              </div>
                        </div>
                        <div class="control-group span7">
                              <label class="control-label">帖子编码：</label>
                              <div class="controls">
                                    <input type="text" class=" control-text" name="name" id="goodsName">
                              </div>
                        </div>
                        <div class="control-group span2">
                           <button type="submit" class="jx-btn btn-default">搜索</button>
                        </div>
                     </div>

                  </form>
               </div>
               <div id="tab"></div>
               <div id="panel" class="">
                        <div>
                            <div id="grid"></div>
                            <div></div>
                            <div></div>
                        </div>
                    </div>
            </div>
      </div>
      </div>

      <!-- 初始隐藏 dialog内容    -->
      <div id="content" class="hide">
            <form id="form" class="jx-form form-horizontal jx-form-thin">
                  <div class="row">
                        <div class="control-group span10">
                              <label class="control-label">排序：</label>
                              <div class="controls">
                                    <input type="text" name="e" class="control-text" data-rules="{required:true,number:true}">
                              </div>
                        </div>
                  </div>
                  <div class="row">
                        <div class="control-group span10">
                              <label class="control-label">帖子数：</label>
                              <div class="controls">
                                    <input type="text" name="d" class="control-text" data-rules="{required:true}">
                              </div>
                        </div>
                  </div>
                  <div class="row">
                        <div class="control-group span10">
                              <label class="control-label">标签组：</label>
                              <div class="controls">
                                    <input type="text" name="c" class="control-text" data-rules="{required:true}">
                              </div>
                        </div>
                  </div>

                  <div class="row">
                        <div class="control-group span10">
                              <label class="control-label">标签编码：</label>
                              <div class="controls">
                                    <input type="text" name="b" class="control-text" data-rules="{required:true,number:true}">
                              </div>
                        </div>
                  </div>
                  <div class="row">
                        <div class="control-group span10">
                              <label class="control-label">标签名称：</label>
                              <div class="controls">
                                    <input type="text" name="a" class="control-text" data-rules="{required:true,number:true}">
                              </div>
                        </div>
                  </div>
            </form>
      </div>

      <script type="text/javascript" src="../../../assets/js/jquery-1.8.1.min.js"></script>
      <script type="text/javascript" src="../../../assets/js/bui-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/config-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/admin.js"></script>

      <script type="text/javascript">
            BUI.use('common/page');
      </script>
      <!-- script start -->
      <script>
            $("#add-new-btn").click(function () {
                  top.topManager.openPage({
                        id: 'add-new-btn',
                        href: 'templates/post/review-post/post-add.html',
                        title: '添加帖子信息'
                  });
            });
            BUI.use(['bui/grid', 'bui/data', 'bui/calendar', 'bui/tab', 'common/search'], function (Grid, Data, Calendar,
            Tab, Search) {
            var Grid = Grid,
                Store = Data.Store,
                columns = [{
                    title: '帖子信息',
                    dataIndex: 'a',
                    elCls: 'center', //居中
                    width: 280,
                    renderer: function (value, obj) {
                        return '<div class="td-inner">' +
                        '<p>激想体育特卖号 3848317555158315</p>'+
                        '  <img class="pro-img"   src="../../../assets/img/u9486.png" alt="">' +
                        '  <div class="pro-info  ml-10">' +
                        '      <p>超级帅气的衣服，没有比这更帅了的贺卡和反恐等哈就放寒假</p>' +
                        '      <span style="color:#0099FF;">时尚，化妆品</span>' +
                        '  </div>' +
                        '</div>'
                  }
                }, {
                    title: '商品数',
                    elCls: 'center',
                    dataIndex: 'b',
                    width: 150
                }, {
                    title: '类型',
                    elCls: 'center',
                    dataIndex: 'c',
                    width: 100
                }, {
                    title: '优惠',
                    elCls: 'center',
                    dataIndex: 'd',
                    width: 150
                }, {
                    title: '创建时间',
                    elCls: 'center',
                    dataIndex: 'e',
                    width: 150
                }, {
                    title: '审核状态',
                    dataIndex: 'f',
                    elCls: 'center',
                    width: 200
                } , {
                    title: '操作',
                    dataIndex: 'h',
                    elCls: 'center',
                    width: 200,
                    renderer: function (value, obj) {
                        var editStr = Search.createLink({ //链接使用 此方式
                            id: 'edit' + obj.id,
                            title: '审批帖子详情',
                            text: '[ 查看 ] ',
                            href: 'templates/post/review-post/post-detail.html'
                        });
                        return editStr;
                    }
                }],
                data = [{
                    a: '',
                    b: '9',
                    c: '限时活动',
                    d: '满减优惠',
                    e: '2017-03-14 12:21:21',
                    f: '待审核',
                    
                    w: '',
                } ];
            var datepicker = new Calendar.DatePicker({
                trigger: '.calendar',
                autoRender: true
            });
            var store = new Store({ //初始化数据
                    data: data,
                    pageSize: 2 // 配置分页数目
                }),
                grid = new Grid.Grid({
                    render: '#grid',
                    elCls: 'small-bui-grid-table',
                    columns: columns,
                    bbar: {
                        // pagingBar:表明包含分页栏
                        pagingBar: true
                    },
                    store: store
                }),
                tab = new Tab.TabPanel({
                    render: '#tab',
                    elCls: 'nav-tabs',
                    panelContainer: '#panel', //如果内部有容器，那么会跟标签项一一对应，如果没有会自动生成
                    //                 selectedEvent : 'mouseenter',//默认为click,可以更改事件
                    autoRender: true,
                    children: [{
                        id: '0',
                        title: '待审核(5)',
                        value: '2',
                    }, {
                        id: '1',
                        title: '审核拒绝(5)',
                        value: '1',
                    }, {
                        id: '2',
                        title: '审核通过(500)',
                        value: '3',
                    } ,{
                        id: '3',
                        title: '保存(100)',
                        value: '4',
                    } ]
                });
            var index = 0;
            tab.on('selectedchange', function (ev) {
                var item = ev.item;
            });

            tab.setSelected(tab.getItemAt(0));

            grid.render();
        });
      </script>
      <!-- script end -->

</body>

</html>